In here are the list of things I did for a particular hour or day. Also included here are the screenshots of games I played, or videos I watched or listened to, or just random things I stumbled upon. I'll occasionally write down what I'm thinking, or things I'm planning to do.
Bah, I just spent an hour fixing bugs on my site. The strange thing is, it works fine on my machine, but when it builds on github's runner, a bunch of strange stuffs shows up.
I thought it was because I was using a macOS runner, but same thing happens on ubuntu too.
Of course, the bugs are entirely my own fault, but it would have been ideal if I could reproduce the bugs on my local computer, instead of debugging on github's action logs.
One of the reason I'm using [redbean](https://redbean.dev/) in the first place is that I'm hoping I could get that consistent behaviour across different systems without worrying about special quirks that I have to handle. Oh well, I can't have that too I guess.
Well, so much for my plans for today, I mostly just did a bunch of changes on my personal site. I also managed to cut down the build time from 10 seconds to two seconds by caching the filesystem reads.
Huh, the more features I add to my personal site, the slower the total build time. Adding the tagging feature increased the build time to around 10s. But who cares, I only build the site when I need to deploy, I don't need to build during development and testing.
The codebase has gotten quite a mess though. Anyway, it's mostly temporary, throwaway code that it will change according to my ephemeral whims.
Aha, I managed to tag 800 images in one sitting, for about a half an hour. I did with just keybindings using vim and the dolphin file manager. I should just write a script in the future though.
Frieren, Dungeon Meshi and Shanri-la have the most picturesque screenshots. They really do have a good art, I could just take any random screenshots and it would likely look good.
Fu, I actually have a thousand of images to tag, I can't believe I've accumulated that much screenshots already. I should limit the screenshots when I watch anime. Also, lol I can't even remember for the life of me what the names of anime I watched. Even the catchy titles like Solo Leveling.
I have now implemented tagging on my personal site, and current I'm tediously adding tags to each log and image. I kind of wish I did this earlier. Oh well, it's not that bad, it's mostly a repetitive, mechanical work.
https://news.ycombinator.com/item?id=39511714 I should add some /now on my shitty personal site as well. Not sure about /ideas though, I sure don't have shortage of them, but they are mostly dumb or uninteresting.
I've been wondering too if I should submit my site to aboutideasnow.com, kagi or marginalia. I don't really have any interesting content though. Maybe some time in the future.
Worked on the website using the lua templating. On my filesystem, I tentatively named the project folder as goom-temple, which actually sounds inappropriate since goom jokingly refers something specific for a certain shark fanbase, but it doesn't matter, it's just a temporary name. For brevity, I'll refer to this project as SN (slacker news) for now.
As expected, I haven't done much for today, most of which are scaffolding stuffs for the overall project structure. I also properly configured my neovim lsp this time, both for lua and go.
Right now, I'm wondering if I should do some maintenance work on moon temple. Tasks like refactoring, cleaning up, add do some proper releases, that kind of stuffs.
Or I could start a new project. I want to try html.lua with a golang backend, and webui as the frontend. Then try htmz for general frontend/backend interaction.
Or not, I should invest more time creating stuffs with godot and blender.
Added some markdown library, so my logs would look well formatted. The markdown library is actually using the older spec, so triple ``` isn't event supported. It's good enough for now, but ideally, I should just avoid markdown and just put longer notes on a separate lua page.
I also gave myself a haircut today. By haircut, I mean I trimmed excess hair so the hair would stop poking my eyes, and I could save some soap and shampoo. Cutting my own hair saved me about $2, and importantly saves me the anxiety of having to go outside. Needless to say, my hair looks like shit, before and after.
But as the saying goes, even stinkiest fart eventually goes away. I'm sure in the whole history of mankind someone said that, surely. I just remembered a certain shark saying "fart in the wind", which is identical in meaning.
Modified the build action so that local links with filename parameters will be included in the build files. I also updated converted the .gif files to mp4, which reduced the overall size from ~100MB to 20MB. Even though I only worked for about an hour or two, I feel like I got a lot of things done. Useless stuffs to be sure, but at least I felt productive. Also, the owl has just finished singing.
Finished the pagination. In my previous site generator, I used query parameters for the page numbers, but this time I used a custom file parameters, such as:
/page[page=1,param=2,xyz=foo].html
This way, the local links will be the same on dev server, and on the html build files. I also discovered that I can lazy load images by doing `<img loading="lazy" ... />.` This should at least reduce page load time and bandwidth usage. It's a nice work-around for not being able to generate thumbnails for the mean time.
I started implementing pagination for the logs page, this is too avoid loading too many images in one page. The ideal, alternative solution would be to generate thumbnails for my screenshots, but for now I want moon-temple to be fully cross-platform without any dependencies, and for that, I can't rely on external image libraries to resize images. It's possible to write a pure lua implementation of png resizing, but that's not going to be an easy task.
Okay, now I added some bash script using the scrot tool to easily screenshot my current questionable decisions in life. I just now need to modify the log.page.html page to automatically embed the screenshots I did for each hour.
Also, I didn't realize how much bigger PNG images are compared to JPEG. I know JPEG is a lossy format, but to think how much disk space it saves, the JPEG screenshot I just took is about 1/10 the size of the same PNG image.
Anyway, that's enough coding for the day. My chest is starting to ache a bit from the coffee+adrenaline and sitting for too long.
I was using lua to generate a new page using the redbean runtime, but I noticed the local time returned by os.time() was off by -16 hours. I thought this was just a quirk of lua library (lua does have a lot). But then, I tried it again with the official lua interpreter, and it returns the correct time. This isn't documented anywhere, so I guess it's a redbean bug.
More importantly, I felt like the year was also off by one, it's shows 2024, but it's only 2023 right?
No, it's already 2024. The fuck...?
site last updated on 2024-10-16 | created with moontpl